SPE=0
DO WHILE .T.
   SET COLO TO BG+/B,W+/N
   @ 10,1 CLEA TO 23,78
   SET COLO TO BG+/B,w+/n
   @ 13, 3  TO 23,32 DOUBLE
   @ 13,43  TO 23,72 DOUBLE
   @ 14, 5  PROMPT "1. DRUGS               "
   @ 16, 5  PROMPT "2. SMALL EQUIPMENT     "
   @ 18, 5  PROMPT "3. DENTAL CONSUMMABLES "
   @ 20, 5  PROMPT "4. VACCINATION         "
   @ 22, 5  PROMPT "5. INJECTION           "
   @ 14,45  PROMPT "6. DISPOSABLE ITEMS    "
   @ 16,45  PROMPT "7. DRESSINGS           "
   @ 18,45  PROMPT "8. INFUSION            "
   @ 20,45  PROMPT "9. LABORATORY SUPPLIES "
   @ 22,45  PROMPT "X. END OF SESSION      "
   MENU TO SPE
   SET COLO TO BG+/B,w+/n
   IF LAST()=27
       RETURN
   ENDIF
   DO CASE
      CASE SPE=1
         F1='DRUGS'
         F11='DRUGNM'
         F2='PUR_DRUG'
      CASE SPE=2
         F1='DISPOS'
         F11='DISPNM'
         F2='PUR_DISP'
      CASE SPE=3
         F1='DISPOS'
         F11='DISPNM'
         F2='PUR_DISP'
      CASE SPE=4
         F1='DRUGS'
         F11='DRUGNM'
         F2='PUR_DRUG'
      CASE SPE=5
         F1='DRUGS'
         F11='DRUGNM'
         F2='PUR_DRUG'
      CASE SPE=6
         F1='DISPOS'
         F11='DISPNM'
         F2='PUR_DISP'
      CASE SPE=7
         F1='DISPOS'
         F11='DISPNM'
         F2='PUR_DISP'
      CASE SPE=8
         F1='DRUGS'
         F11='DRUGNM'
         F2='PUR_DRUG'
      CASE SPE=9
         F1='DISPOS'
         F11='DISPNM'
         F2='PUR_DISP'
      CASE SPE=10
         return
   ENDCASE
   DR='N:'
   SELE 1
   SET EXCLU OFF
   use &DR&F1 INDEX &DR&F1
   SELE 2
   SET EXCLU OFF
   USE &DR&F2 INDE &DR&F2
   F3='SUPPLIER'
   SELE 3
   SET EXCLU OFF
   USE &DR&F3 INDEX &DR&F3
   @ 12,1 CLEA TO 23,78
   Set colo to bg+/b,w+/n
   CODEMAC=SUBS(F1,1,4)+'_CODE'
   NAMEMAC=SUBS(F1,1,4)+'_NAME'
   TYPEMAC=SUBS(F1,1,4)+'_TYPE'
   QANTMAC=SUBS(F1,1,4)+'_QANT'
   UNITMAC=SUBS(F1,1,4)+'_UNIT'
   TYPSPEC=LTRIM(STR(SPE,1))
   SELE 1
   SET EXCLU OFF
   use &DR&F1 INDEX &DR&F1
   go top
   CNT=0
   KODE=SPACE(4)
   kunci=space(5)
   do boxe with 12,3,'Enter Initial of Drug/Disposable Name : ','KUNCI','N','BG','W+','N',5,.T.,.T.
   if lastkey()=27
      set colo to bg+/b,w+/n
      loop
   endif
   do PUR_GET
   IF CNT=0 .or. lastkey()=27
      set colo to bg+/b,w+/n
      LOOP
   ENDIF
   SELE 1
   SET INDE TO &DR&F1
   SEEK KODE
   do pur_sp_b
   loop
ENDDO
RETU
